//
//  SecondViewController.m
//  UI-10-作业
//
//  Created by dllo on 16/6/17.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SecondViewController.h"
#import "LTView.h"
#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#define ScreenHeight [UIScreen mainScreen].bounds.size.height

@interface SecondViewController ()
@property (nonatomic,retain)LTView *ltView;
@property (nonatomic,retain)LTView *ltView1;
@property (nonatomic,retain)LTView *ltView2;
@property (nonatomic,retain)LTView *ltView3;
@property (nonatomic,retain)NSDictionary *div;
@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"联系人详细信息";
    self.navigationController.navigationBar.translucent = NO;
    self.view.backgroundColor = [UIColor whiteColor];
    [self createSubView];
    
}
- (void)createSubView{
    //    NSArray *array = [self.diction allKeys];
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(120, 10, 120, 120)];
    imageView.backgroundColor = [UIColor grayColor];
    imageView.image = [UIImage imageNamed:[self.diction objectForKey:@"tupian"]];
    
    [self.view addSubview:imageView];
    self.ltView = [[LTView alloc] initWithFrame:CGRectMake(0, 150, ScreenWidth, 60) Text:@"姓名:" TextField:[self.diction objectForKey:@"name"]];
    [self.view addSubview:_ltView];
    
    
    self.ltView1 = [[LTView alloc] initWithFrame:CGRectMake(0, 240, ScreenWidth, 60) Text:@"QQ:" TextField:[self.diction objectForKey:@"QQ"]];
    [self.view addSubview:_ltView1];
    
    self.ltView2 = [[LTView alloc] initWithFrame:CGRectMake(0, 330, ScreenWidth, 60) Text:@"电话:" TextField:[self.diction objectForKey:@"number"]];
    [self.view addSubview:_ltView2];
    
    
    //创建button返回
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    [button setTitle:@"返回上一页" forState:UIControlStateNormal];
    button.frame = CGRectMake(100, 540, 100, 50);
    button.backgroundColor = [UIColor purpleColor];
    [button addTarget:self action:@selector(didClickedButton:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
    
    
}
- (void)didClickedButton:(UIButton *)button{
    [self.delegate passConent:self.diction];
    
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end